﻿@using GSLMS.WebAPP
@model GSLMS.Entity.TB_APP_PROINFO
@{
    Layout = null;

    var ddlProduct = ViewData["Product"] as SelectList;
    var ddlSource = ViewData["Source"] as SelectList;
    var ddlDocType = ViewData["DocType"] as SelectList;
    var ddlRepayment = ViewData["Repayment"] as SelectList;
    var ddlHouType = ViewData["HouType"] as SelectList;
    var ddlSignMan = ViewData["SignMan"] as SelectList;
    var ddlBussType = ViewData["BussType"] as SelectList;

    Model.ProForHouInfo = Model.ProForHouInfo ?? new GSLMS.Entity.TB_APP_PROFORHOUINFO();
}
<div class="pageContent">
    <div class="tabs" currentindex="0" eventtype="click">
        <div class="tabsHeader">
            <div class="tabsHeaderContent">
                <ul>
                    <li><a href="javascript:;"><span>赎楼申请</span></a></li>
                    @if (Model.ID > 0)
                    {
                        <li><a href="DianDang/Apply/ProInfo/MetInfoCreate/@Model.ID" class="j-ajax"><span>材料收集清单</span></a></li>
                        <li><a href="javascript:;"><span>共同借款人</span></a></li>
                        <li><a href="javascript:;"><span>联系人</span></a></li>
                        <li><a href="javascript:;"><span>附件</span></a></li>
                        <li><a href="DianDang/Apply/ProInfo/SumbitInfo/@Model.ID" class="j-ajax"><span>提交</span></a></li>
                    }
                </ul>
            </div>
        </div>
        <div class="tabsContent">
            <div>
                <form method="post" action="DianDang/Apply/ProInfo/CreateHouInfo?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogReloadAjaxDone)">
                @Html.ValidationSummary(true)
                <div class="pageFormContent" layouth="90">
                    @Html.HiddenFor(model => model.ID)
                    @Html.HiddenFor(model => model.REGINFOID)
                    @Html.HiddenFor(model => model.ProForHouInfo.REGINFOID)
                    @Html.Hidden("RefRegInfoSubmitButton")
                    <p>
                        <label>
                            申请编号：</label>
                        @Html.TextBoxFor(model => model.APPLYNO, new { @class = "", @readonly = "true", @alt = "自动生成" })
                        @Html.ValidationMessageFor(model => model.APPLYNO)
                    </p>
                    <p>
                        <label>
                            所属部门：</label>
                        @Html.TextBoxFor(model => model.DEPNAME, new { @readonly = "true" })
                        @Html.ValidationMessageFor(model => model.DEPNAME)
                        @Html.HiddenFor(model => model.DEPID)
                    </p>
                    <p>
                        <label>
                            申请日期：</label>
                        @Html.TextBoxFor(model => model.APPDATE, new { @class = "", @readonly = "true" })
                        @Html.ValidationMessageFor(model => model.APPDATE)
                    </p>
                    <p>
                        <label>
                            业务类型：</label>
                        @Html.HiddenFor(model => model.BUSSTYPE)
                        <span>赎楼 </span>
                    </p>
                    <p>
                        <label>
                            贷款产品：</label>
                        @Html.DropDownListFor(model => model.PRODUCTID, ddlProduct, new { @class = "combox", @selectedvalue = Model.PRODUCTID, @sumbitText = "PRODUCTNAME" })
                        @Html.ValidationMessageFor(model => model.PRODUCTID)
                    </p>
                    <p>
                        <label>
                            来源渠道：</label>
                        @Html.DropDownListFor(model => model.SOURCE, ddlSource, new { @class = "combox", @selectedvalue = Model.SOURCE })
                        @Html.ValidationMessageFor(model => model.SOURCE)
                    </p>
                    <p>
                        <label>
                            中介人：</label>
                        @Html.TextBoxFor(model => model.MEDIATOR, new { @class = "", @readonly = "true" })
                        @Html.ValidationMessageFor(model => model.MEDIATOR)
                        @Html.HiddenFor(model => model.MEDIATORID)
                    </p>
                    <p>
                        <label>
                            中介人账号：</label>
                        @Html.TextBoxFor(model => model.MEDIATORACCOUNT, new { @class = "" })
                        @Html.ValidationMessageFor(model => model.MEDIATORACCOUNT)
                    </p>
                    @* <p>
                        <label>
                            中介人手机号：</label>
                        @Html.TextBoxFor(model => model.MEDIATORTEL, new { @class = "" })
                        @Html.ValidationMessageFor(model => model.MEDIATORTEL)
                    </p>*@
                    <div class="divider" />
                    <p style="width: 100px">
                        <label>
                            存在特批：</label>
                        <dl style="width: 100px">
                            <dt style="width: 30px">@(Model.ISSPECIAL == 1 ? "是" : "否")</dt>
                            @if (Model.ISSPECIAL > 0)
                            {
                                <dt style="width: 50px">&nbsp; <a class="button" href="DianDang/Apply/SpecailInfo/Details/@Model.SPECID?OpID=@ViewData["OperateID"]" Target="dialog" >
                                    <span>查看</span></a></dt>
                            }
                        </dl>
                    </p>
                    <p>
                        <label>
                            跟进风控:</label>
                        @*@Model.AduRiskControl.AUDITBY*@
                    </p>
                    <div class="divider" />
                    <p>
                        <label>
                            申请人姓名：</label>
                        @Html.TextBoxFor(model => model.CUSTNAME, new { @class = "", @readonly = "true" })
                        @Html.ValidationMessageFor(model => model.CUSTNAME)
                    </p>
                    <p>
                        <label>
                            证件类型：</label>
                        @Html.DropDownListFor(model => model.DOCTYPE, ddlDocType, new { @class = "combox", @selectedvalue = Model.DOCTYPE, @sumbitText = "DOCTYPENAME" })
                        @Html.ValidationMessageFor(model => model.DOCTYPE)
                    </p>
                    <p>
                        <label>
                            证件号码：</label>
                        @Html.TextBoxFor(model => model.CUSTNO, new { @class = "required" })
                        @Html.ValidationMessageFor(model => model.CUSTNO)
                    </p>
                    <p>
                        <label>
                            交易相对方：</label>
                        @Html.HiddenFor(model => model.ProUnForHouInfo.REGINFOID)
                        @Html.TextBoxFor(model => model.ProForHouInfo.TRADEBY, new { @class = "" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.TRADEBY)
                    </p>
                    <p>
                        <label>
                            借款金额：</label>
                        @Html.TextBoxFor(model => model.AMOUNT, new { @class = "" })
                        <span>&nbsp;万元</span>
                        @Html.ValidationMessageFor(model => model.AMOUNT)
                    </p>
                    <p>
                        <label>
                            贷款期限：</label>
                        @Html.TextBoxFor(model => model.LOANPHASE, new { @class = "number" })
                        @Html.ValidationMessageFor(model => model.LOANPHASE)
                        @Html.RadioButtonFor(model => model.LOANPHAESTYPE, 0)
                        天&nbsp;
                        @Html.RadioButtonFor(model => model.LOANPHAESTYPE, 1)
                        月
                    </p>
                    <p>
                        <label>
                            赎楼方式：</label>
                        @Html.DropDownListFor(model => model.ProForHouInfo.FORHOUTYPE, ddlHouType, new { @class = "combox", @selectedvalue = Model.ProForHouInfo.FORHOUTYPE })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.FORHOUTYPE)
                    </p>
                    <p>
                        <label>
                            类型：</label>
                        @Html.DropDownListFor(model => model.ProForHouInfo.BUSSTYPE, ddlBussType, new { @class = "combox", @selectedvalue = Model.ProForHouInfo.BUSSTYPE })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.BUSSTYPE)
                    </p>
                    <p>
                        <label>
                            物业位置：</label>
                        @Html.TextBoxFor(model => model.ProForHouInfo.HOUADD, new { @class = "" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.HOUADD)
                    </p>
                     <ul>
                    <li style="width:95%; line-height:25px;">
                        <label>
                            物业权属：</label>
                            该物业权利人为：
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.TENRIGHT, new { @class = "", @title = "权利人", @alt = "权利人", @style = "width:100px; float:none;" })</span>
                        ，现抵押于
                        <span>
                            @Html.TextBoxFor(model => model.ProForHouInfo.TENBANK, new { @class = "", @title = "抵押银行", @alt = "抵押银行", @style = "width:100px; float:none;" })
                        </span>
                        银行
                        <span>
                            @Html.TextBoxFor(model => model.ProForHouInfo.TENSUBBACK, new { @class = "", @title = "抵押支行", @alt = "抵押支行", @style = "width:100px; float:none;" })
                        </span>
                        支行，截至
                        <span>
                            @Html.TextBoxFor(model => model.ProForHouInfo.TENENDDATE, new { @class = "date", @alt = "截至日期", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @style = "width:100px; float:none;" })</span>
                        ,尚欠银行款项合计为
                        <span>
                            @Html.TextBoxFor(model => model.ProForHouInfo.TENLEFTAMT, new { @class = "number", @alt = "尚欠款项", @style = "width:100px; float:none;" })
                        </span>
                        元人民币。 
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.TENRIGHT)
                    </li>
                   <li style="width:95%; line-height:25px;">
                        <label>
                            交易情况：</label>
                            房产购建价为
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.HOUPRICE, new { @class = "number", @title = "房产购建价", @alt = "房产购建价", @style = "width:100px; float:none;" })</span>
                        元 ，此次交易总价为
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.HOUTOTALPRICE, new { @class = "number", @title = "交易总价", @alt = "交易总价", @style = "width:100px; float:none;" })</span>
                        元 ，买方已付定金
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.DOWNPAYAMT, new { @class = "number", @title = "已付定金", @alt = "已付定金", @style = "width:100px; float:none;" })</span>
                        元，首期款为
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.FIRSTPAYAMT, new { @class = "number", @title = "首期款项", @alt = "首期款项", @style = "width:100px; float:none;" })</span>
                        元，付款方式：
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.PAYMOD, new { @class = "", @title = "付款方式", @alt = "付款方式", @style = "width:100px; float:none;" })</span>
                        <span>@Html.ValidationMessageFor(model => model.ProForHouInfo.HOUPRICE)</span>
                    </li>
                   
                    <li style="width:95%; line-height:25px;">
                        <label>
                            还款来源：</label>
                        新按揭银行：
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.PAYBANK, new { @class = "", @title = "来源银行", @alt = "来源银行", @style = "width:100px; float:none;" })</span>
                        银行
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.PAYSUBBANK, new { @class = "", @title = "来源支行", @alt = "来源支行", @style = "width:100px; float:none;" })</span>
                        支行&nbsp;&nbsp;&nbsp;&nbsp;承诺金额：
                        <span>@Html.TextBoxFor(model => model.ProForHouInfo.PROMISEAMT, new { @class = "number", @title = "承诺金额", @alt = "承诺金额", @style = "width:100px; float:none;" })</span>
                        <span>万元</span>
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.HOUPRICE)
                    </li>
                   </ul>
                    <p>
                        <label>
                            利率：</label>
                        @Html.TextBoxFor(model => model.RATE, new { @class = "number" })%
                        @Html.ValidationMessageFor(model => model.RATE)
                    </p>
                    <p>
                        <label>
                            手续费：</label>
                        @Html.TextBoxFor(model => model.LOANFEE, new { @class = "number" })%
                        @Html.ValidationMessageFor(model => model.LOANFEE)
                    </p>
                    <p>
                        <label>
                            还款方式：</label>
                        @Html.DropDownListFor(model => model.ProForHouInfo.SPAREFIELD1, ddlRepayment, new { @class = "combox", @selectedvalue = Model.ProForHouInfo.SPAREFIELD1 })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.SPAREFIELD1)
                    </p>
                    <p style="width: 95%">
                        <label style="width: 180px">
                            反担保措施文件及反担保措施1：</label>
                        @Html.TextBoxFor(model => model.ProForHouInfo.COUGUA1, new { @class = "", @style = "width:500px" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.COUGUA1)
                    </p>
                    <p style="width: 95%">
                        <label style="width: 180px">
                            反担保措施文件及反担保措施2：</label>
                        @Html.TextBoxFor(model => model.ProForHouInfo.COUGUA2, new { @class = "", @style = "width:500px" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.COUGUA2)
                    </p>
                    <p style="width: 95%">
                        <label>
                            落实情况1：</label>
                        @Html.TextBoxFor(model => model.ProForHouInfo.VERIFILD1, new { @class = "", @style = "width:560px" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.VERIFILD1)
                    </p>
                    <p style="width: 95%">
                        <label>
                            落实情况2：</label>
                        @Html.TextBoxFor(model => model.ProForHouInfo.VERIFILD2, new { @class = "", @style = "width:560px" })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.VERIFILD2)
                    </p>
                    <p>
                        <label>
                            项目经理：</label>
                        @Html.TextBoxFor(model => model.SALESMAN, new { @class = "" })
                        @Html.ValidationMessageFor(model => model.SALESMAN)
                        @Html.HiddenFor(model => model.SALESMANID)
                    </p>
                    <p>
                        <label>
                            共同面签人：</label>
                        @Html.DropDownListFor(model => model.ProForHouInfo.SIGNMAN, ddlSignMan, new { @class = "combox", @selectedvalue = Model.ProForHouInfo.SIGNMAN })
                        @Html.ValidationMessageFor(model => model.ProForHouInfo.SIGNMAN)
                    </p>
                </div>
                <div class="formBar">
                    <ul>
                        <li>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">
                                        保存</button></div>
                            </div>
                        </li>
                    </ul>
                </div>
                </form>
            </div>
            <div>
            </div>
            <div>
                <div id="divProTarInfoCreate">
                </div>
                <div id="divProTarInfoList">
                </div>
            </div>
            <div>
                <div>
                    <div id="divProConInfoCreate">
                    </div>
                    <div id="divProConInfoList">
                    </div>
                </div>
            </div>
            <div>
                <div id="divProFilesInfoCreate">
                </div>
                <div id="divProFilesInfoList">
                </div>
            </div>
            <div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
    var id=@Model.ID;
    if (id > 0){
        RefreshProTarInfoCreate(0);
        RefreshProTarInfoList();
        RefreshProConInfoCreate(0);
        RefreshProConInfoList();
        RefreshProFilesInfoCreate(0);
        RefreshProFilesInfoList();
        }

    });
    function RefreshProTarInfoList() {
        $("#divProTarInfoList").loadUrl("DianDang/Apply/ProInfo/TarInfoList/@Model.ID", {}, function () {
            $("#divProTarInfoList").find("[layoutH]").layoutH();
        });
    }
    function RefreshProTarInfoCreate(id) {
        $("#divProTarInfoCreate").loadUrl("DianDang/Apply/ProInfo/TarInfoCreate/" + id+"?CreateNewFlag=0&proID=@Model.ID&regID=@Model.ID", {}, function () {
            $("#divProTarInfoCreate").find("[layoutH]").layoutH();
        });
    }
    function SaveProTarInfoCreate(n) {
        $("#CreateNewFlag").attr("value",n);
        $("#btn_toSave").click();
    }

    function RefreshProConInfoList() {
        $("#divProConInfoList").loadUrl("DianDang/Apply/ProInfo/ConInfoList/@Model.ID", {}, function () {
            $("#divProConInfoList").find("[layoutH]").layoutH();
        });
    }
    function RefreshProConInfoCreate(id) {
        $("#divProConInfoCreate").loadUrl("DianDang/Apply/ProInfo/ConInfoCreate/" + id+"?proID=@Model.ID&regID=@Model.ID", {}, function () {
            $("#divProConInfoCreate").find("[layoutH]").layoutH();
        });
    }
    function RefreshProFilesInfoList() {
        $("#divProFilesInfoList").loadUrl("DianDang/Apply/ProInfo/FilesInfoList/@Model.ID", {}, function () {
            $("#divProFilesInfoList").find("[layoutH]").layoutH();
        });
    }
    function RefreshProFilesInfoCreate(id) {
        $("#divProFilesInfoCreate").loadUrl("DianDang/Apply/ProInfo/FilesInfoCreate/" + id+"?proID=@Model.ID&regID=@Model.ID", {}, function () {
            $("#divProFilesInfoCreate").find("[layoutH]").layoutH();
        });
    }
</script>
